package entity;

import java.io.Serializable;
import javax.persistence.Entity;

@Entity(name="TextElement")

public class TextElementEntity extends UnstructuredContentElementEntity implements Serializable 
{
    private String text;
    
    public TextElementEntity()
    {
        super();
    }
    
    
    
    public TextElementEntity(Integer displayOrder, String name, String text)
    {
        super(displayOrder, name);     
        this.text = text;
    }
    

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (getId() != null ? getId().hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TextElementEntity)) {
            return false;
        }
        TextElementEntity other = (TextElementEntity) object;
        if ((getId() == null && other.getId() != null) || (getId() != null && !getId().equals(other.getId()))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entity.TextElement[ id=" + getId() + " ]";
    }

    
    
    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }    
}
